<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddVersionInOauthDeviceTable extends AbstractMigration
{
    public function up()
    {
        $this->table('oauth_device')
            ->addColumn('version', 'string', [
                'null' => false,
                'default' => '',
                'limit' => 64,
                'comment' => '客户端版本',
            ])
            ->save();
    }

    public function down()
    {
        $this->table('oauth_device')
            ->removeColumn('version')->save();
    }
}
